(1) Field of the Invention
The present invention relates to a method and apparatus for preventing runaway of a central processing unit (CPU) of a microcomputer. More particularly, the present invention relates to a technique of improving the precision of a failure determination in a vehicle-controlling CPU which is driven by a battery power source.
(2) Description of the Related Art
In the case where a microcomputer driven by a battery power source is used as a means for affecting various controls in an automobile engine or the like, a runaway-preventing circuit is generally disposed as a safety means.
In this runaway-preventing circuit, an abnormality of the CPU is detected from a program run signal from the CPU, and at the detection of the abnormality, a reset signal (system reset signal) is output to the CPU to initialize the system (see Japanese Patent Application Laid-Open Specification No. 61-86847).
Furthermore, for effecting a normal operation in the microcomputer, a predetermined power source voltage should be applied, and if the applied voltage is lower than the predetermined power source voltage, runaway of CPU is caused. Accordingly, also at the time of reduction of the power source voltage, the system reset signal is output to prevent runaway of the CPU (see Japanese Patent Application Laid-Open Specification No. 61-42001).
Namely, in the conventional runaway-preventing circuit, at the time of detection of an abnormality and/or at the time of reduction of the power source voltage, a system reset signal is output to the CPU to reset the CPU to the initial stage and prevent runaway of the CPU, and when the number of system reset signals output to the CPU during a unit time exceeds a predetermined value, the CPU is judged to have failed.
However, in the conventional technique, failure is judged according to the number of reset signals output to the CPU by using the combination of reset signals based on program run signals and reset signals based on the reduction of the battery voltage, and therefore, if this conventional circuit is used as a means for controlling an automobile engine, as shown in FIG. 4, at the time of reduction of the battery voltage upon starting the engine where power consumption is large, the frequency of reduction of the battery voltage to the CPU below the reference voltage increases and the reset signals are incessantly output to the CPU. Therefore, the count number n of reset signals exceeds the set number (for example, the failure judgement is made in case of n.gtoreq.4). Accordingly, even in the case of the CPU operating normally, because this reduction of the voltage, it is erroneously determined that the CPU has failed.